package com.team233.zuccecho.repository;

import com.team233.zuccecho.Bean.Template;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface TemplateRepository extends JpaRepository<Template,Long> {
    @Query(value = "select * from template where teacher_id=?1 and if_delete = 0 limit 10",nativeQuery = true)
    List<Template> findByTeacherId(String teacher_id);

    @Query(value = "select * from template where template_id =?1",nativeQuery = true)
    Template findByTemplateId(long template_id);

}
